<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-07-18
    	描述：政策发布-发布内容
    -->
	<div class="HomePage">
		<div class="location">
			<div class="location-text fl">
				<img class="location-img fl" src="../../images/home/zhengce.png" />
				<p class="fr">{{policyRelease.id == null || policyRelease.id == "" ? "政策发布" : "政策修改"}}</p>
			</div>
			<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
		</div>
		<div class="IssuedNotice-box">
			<form id="policyReleaseForm" class="form-box">
				<input type="hidden" name="id" :value="policyRelease.id" />
				<div class="search-boxs form-line input-required fl">
					<label>政策标题：</label>
					<div class="input-box">
						<input name="name" class="search-box" type="text" v-model="policyRelease.name" />
					</div>
				</div>
				<div class="search-boxs form-line  fr">
					<select class="search-box" name="type" placeholder="政策类型">
						<option value="0" :selected="policyRelease.type == 0 ? true : false">国家政策</option>
						<option value="1" :selected="policyRelease.type == 1 ? true : false">地方政策</option>
					</select>
				</div>

				<div class="search-boxs form-line editor-box publish-editor">
					<label><span>*</span>正文：</label>
          <textarea name="content" class="editor" id="editor" style="width: 700px;height: 270px; display: inline-block;  margin: -25px 0px -134px 105px;"></textarea>
          <!--<script name="content" class="editor" id="editor" type="text/plain" style="width: 700px;height: 270px; display: inline-block;  margin: -25px 0px -134px 105px;"></script>-->
				</div>
				<div class="search-boxs input-required  imgbox">
					<label>展示图：</label>
					<div class="imgbtn">
						<input type="file" id="handIdFront" accept="image/*" @change="idFrontImg($event)" style="display: none;" />
						<img class="showHandIdFront" :src="policyRelease.coverUrl != null ? urls.baseUrl + policyRelease.coverUrl : defaultUrl" />
						<a class="Public-btn1 uploadbtn again-upload " @click="touchOffIdInput(1)">重新上传</a>
						<a class="Public-btn1 uploadbtn handIdFrontA " @click="touchOffIdInput(1)">上传</a>
						<input type="hidden" name="coverUrl" :value="policyRelease.coverUrl" />
					</div>
				</div>
				<input class="save fl" type="button" value="发布" @click="saveData" v-if="policyRelease.id == null" />
				<input class="save fl" type="button" value="保存" @click="updateData" v-else />
			</form>
			<label id="coverUrl" v-if="!policyRelease.coverUrl&&showMsg">请选择展示图片</label>
		</div>

	</div>
</template>

<script src="./PublishContent.js"></script>

<style scoped>
	@import "PublishContent.css"
</style>
